package com.xea.model;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 家具常识
 * @author Administrator
 *
 */
public class Information implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1804620362204702529L;
	
	private int id;
	/**
	 * 标题
	 */
	private String title;
	/**
	 * 内容
	 */
	private String content;
	/**
	 * 创建日期
	 */
	private Date createDate;
	/**
	 * 发布
	 */
	private int pub;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String  getCreateDate() {
		return new SimpleDateFormat("yyyy-MM-dd").format(createDate);
	}
	public void setCreateDate(String  createDate) throws ParseException {
		this.createDate =new SimpleDateFormat("yyyy-MM-dd").parse(createDate);
	}
	public int getPub() {
		return pub;
	}
	public void setPub(int pub) {
		this.pub = pub;
	}
	public Information(String title, String content, Date createDate, int pub) {
		super();
		this.title = title;
		this.content = content;
		this.createDate = createDate;
		this.pub = pub;
	}
	public Information() {
		super();
	}
	
	
}
